
var scriptTag = document.getElementById('scriptTag');

window.UMEDITOR_HOME_URL = '/static/js/plugins/umeditor/';

if (scriptTag) {
    require.config({
        paths: {
            jquery: 'jquery-2.1.1',
            bootstrap: 'bootstrap.min',
            Util: 'util',
            Spinner: 'plugins/spinner/spinner.min',
            sweetAlert: 'plugins/sweetalert/sweetalert.min',
            metisMenu: 'plugins/metisMenu/jquery.metisMenu',
            slimscroll: 'plugins/slimscroll/jquery.slimscroll.min',
            inspinia: 'inspinia',
            uploadify: 'plugins/uploadify/jquery.uploadify.min',
            fooTable: 'plugins/footable/footable.all.min',
            nesTable: 'plugins/nestable/jquery.nestable',
            summerNote: 'plugins/summernote/summernote.min',
            summerZhCN: 'plugins/summernote/lang/summernote-zh-CN',
            Dropzone: 'plugins/dropzone/dropzone',
            ueditor: 'plugins/umeditor/umeditor',
            ueditor_config: 'plugins/umeditor/umeditor.config',
//            ueditor_lang:'plugins/umeditor/lang/zh-cn/zh-cn',
        },
        shim: {
            'jquery': {
                exports: '$'
            },
            'bootstrap': {
                deps: ['jquery']
            },
            'metisMenu': {
                deps: ['jquery'],
                exports: 'metisMenu'
            },
            'slimscroll': {
                deps: ['jquery'],
                exports: 'slimscroll'
            },
            'sweetAlert': {
                deps: ['jquery']
            },
            'inspinia': {
                deps: ['jquery']
            },
            'uploadify': {
                deps: ['jquery'],
                exports: 'uploadify'
            },
            'fooTable': {
                deps: ['jquery'],
                exports: 'fooTable'
            },
            'nesTable': {
                deps: ['jquery'],
                exports: 'nesTable'
            },
            'summerNote': {
                deps: ['jquery'],
                exports: 'summerNote'
            },
            'summerZhCN': {
                deps: ['jquery'],
                exports: 'summerZhCN'
            },
            'ueditor': {
                deps: ['jquery', 'ueditor_config']
            }
        },
        //urlArgs: "bust=1.5.3",
        urlArgs: "bust=" + (new Date()).getMonth().toString() + (new Date()).getDay().toString() + (new Date()).getHours().toString(),
        xhtml: true
    });
    require([scriptTag.innerHTML]);
}


